body {
    --chatbar-height: 47px; /* height of the chatbar (52px by default, 47px to align it with the user panel) */

    --custom-channel-textarea-text-area-height: var(--chatbar-height);
}

@property --custom-chatbar {
    syntax: 'off | separated';
    inherits: false;
    initial-value: aligned;
}

.visual-refresh {
    .attachWrapper__0923f {
        padding-top: 0;
        padding-bottom: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@container body style(--custom-chatbar: separated) {
    .visual-refresh {
        .chatContent_f75fb0 {
            background: none;
            border-radius: 0;
            border: none;
            backdrop-filter: none;
        }
        .messagesWrapper__36d07 {
            background-color: var(--background-base-lower);
            border-radius: var(--radius-lg);
            border: var(--border-thickness) solid var(--border-subtle);
            backdrop-filter: var(--panel-backdrop-filter);
            transition: border-color var(--border-hover-transition);
            overflow: hidden;

            &:hover {
                border-color: var(--border-hover);
            }
        }
        .scrollerSpacer__36d07 {
            height: calc(26px + var(--space-xs));
        }
        .scroller__36d07::-webkit-scrollbar-track {
            margin-bottom: calc(26px);
        }
        .chatContent_f75fb0:has(.typing_b88801) .messagesWrapper__36d07::before {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: var(--background-base-lower);
            height: 26px;
            border-radius: 0 0 var(--radius-lg) var(--radius-lg);
            z-index: 2;
        }
        .form_f75fb0 {
            display: flex;
            flex-direction: column;
            padding: 0;
            width: 100%;
            margin-top: 0;
        }
        .typing_b88801 {
            position: absolute;
            order: -1;
            top: calc(-26px + var(--border-thickness) * -1);
            left: calc(var(--border-thickness));
            border-radius: 0 0 0 var(--radius-lg);
            padding: 0 0 0 var(--space-sm);
            height: 26px;
        }
        .channelBottomBarArea_f75fb0 {
            margin-top: var(--gap);
        }
        .channelTextArea_f75fb0 {
            margin: 0;
            background-color: var(--background-base-lower);
            border-radius: var(--radius-lg);
            border: var(--border-thickness) solid var(--border-subtle);
            backdrop-filter: var(--panel-backdrop-filter);
            transition: border-color var(--border-hover-transition);

            &:hover {
                border-color: var(--border-hover);
            }
        }
        .stackedBars__74017 {
            background: none !important;
        }
        .wrapper__44df5 {
            margin: var(--gap) 0 0 0;
            height: var(--chatbar-height);
            padding: 0;
            border-radius: var(--radius-lg);
            border: var(--border-thickness) solid var(--border-subtle);
            backdrop-filter: var(--panel-backdrop-filter);
            transition: border-color var(--border-hover-transition);

            &:hover {
                border-color: var(--border-hover);
            }
        }
    }
}
